<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@include file="./include/jspheader.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>行天下机票系统 - 登录</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<SCRIPT type=text/javascript src="/js/jquery-1.4.4.min.js"></SCRIPT>
<META name=keywords content=行天下机票系统>
<META name=description content=行天下机票系统>
<LINK rel="shortcut icon" href="/images/favicon.ico">
<LINK rel=stylesheet type=text/css href="css/login.css">
<script type="text/javascript">
    $(document).ready(function() {
        $("#userName").focus(
                function() { //文本框获得焦点
                    if ($(this).val() == "Email") {
                        $(this).val("")
                    }
                    $(this).css("color", "#333333");
                }).blur(function() {//文本框失去焦点
                    if ($(this).val() == "") {
                        $(this).val("Email").css({"color":"#999999"})
                    }
                });
        $("#login-form").bind("submit", function() {
            return checkFroms();
        })
    });
    function checkFroms() {
        if (checkPW() && checkemail()) {
            return true;
        } else {
            return false;
        }
    }
    function isEmail(str){
        if(str.indexOf("@")>0){return true;}
        else {return false;}
    }
    function checkemail(){
        var eValue= $.trim($("#userName").attr("value"));
        if(!eValue){
            $(".logInfor").html("登录邮箱不能为空！");
			return false;
        }
        else{
		    return true;
		}
    }
    function checkPW(){//密码格式验证
        var pValue=$.trim($("#userPW").attr("value"));
        if(!pValue){
            $(".logInfor").html("登录密码不能为空！");
			return false;
        }
        else{
            return true;
        }
    }

    function checkeValue() {
        var regEmail = /^[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/;
        var regMiliao = /^\d{6,}$/;
        var eValue = $.trim($("#userName").attr("value"));
        if (eValue.length == 0 || eValue == 'Email') {
            return;
        }
        if (!regEmail.test(eValue)) {
            alert("只支持邮箱进行登录");
            $('#userName').val('').focus();
        }
    }
</script>
</HEAD>
<BODY>
<DIV class="topIcon clearfix"></DIV>
<DIV class=logWrap>
  <H1><A title=机票系统 href=""><img src="images/logo.jpg" /></A></H1>
  <DIV class=logBg>
    <DIV class="logBox clearfix">
      <DIV class="float_right logCon">
        <H2 title=欢迎登录机票系统><SPAN class=hidden>欢迎登录机票系统</SPAN></H2>
        <FORM id=login-form method=post action=doLogin.action>
          <UL>
            <LI>
              <LABEL>账号：
                <INPUT onblur="checkeValue()" id="userName" type="text" name="user.email" class="logInt" value="Email" autocomplete="off" />
              </LABEL>
            </LI>
            <LI>
              <LABEL>密码：
                <INPUT id="userPW" class="logInt" type="password" name="user.password" />
              </LABEL>
            </LI>
            <LI class="logForm logFormCheck">
              <INPUT id="ytLoginForm_rememberMe" value=0 type="hidden" name=LoginForm[rememberMe] />
              <INPUT id="LoginForm_rememberMe" value="true" type=checkbox name=rememberMe />
              <LABEL for=LoginForm_rememberMe>记住我</LABEL>
            </LI>
            <LI class=logForm>
              <INPUT class=logBtn title=登录 value=登录 type=submit name=yt0>
              <A href="user/getpass">找回密码</A>
            </LI>
          </UL>
        </FORM>
        <s:if test="hasActionErrors() == true">
        <DIV style="COLOR: #000" id="login-form_es_" class="logInfor"><s:actionerror theme="simple" /></DIV>
        </s:if>
        <P class=logTips><SPAN>你还没有机票系统？</SPAN><A class="regNow" title="立即注册" href="reg.action">立即注册</A></P>
      </DIV>
      <DIV class="float_left logIcon"></DIV>
    </DIV>
  </DIV>
  <DIV class=logBot></DIV>
</DIV>
<DIV class=Emailbox>
  <DIV id=Emailbox></DIV>
</DIV>
<DIV class=logFooter>行天下自助旅行网： <A href="http://www.xiaomi.com/"
target=_blank>同业系统</A> <SPAN>｜</SPAN> <A href="http://bbs.xtx6.com/"
target=_blank>论坛</A><BR>
  Copyright ©2012 </DIV>
<DIV style="DISPLAY: none">
  <SCRIPT type=text/javascript src="/stat.htm"></SCRIPT>
</DIV>
</BODY>
</HTML>
